<?php
/*
 * Squelette : dist/resume.html
 * Date :      Wed, 20 Sep 2006 11:46:21 GMT
 * Compile :   Tue, 21 Nov 2006 02:23:15 GMT (0.08s)
 * Boucles :   _forums_liens, _auteurs_un, _article_un, _syndic, _auteurs_recents, _articles_populaires
 */ 
//
// <BOUCLE forums>
//
function BOUCLE_forums_lienshtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("forum.date_heure",
		"forum.id_forum",
		"forum.titre",
		"forum.id_article",
		"forum.id_breve",
		"forum.id_rubrique",
		"forum.id_syndic"), # SELECT
		array("spip_forum AS forum"), # FROM
		array("forum.statut='publie'"), # WHERE
		'', # GROUP
		array('forum.date_heure' . ' DESC'), # ORDER
		'0,15', # LIMIT
		'', # sous
		'', # HAVING
		'forum', # table
		'_forums_liens', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_forum'][calcul_index_forum($Pile[$SP]['id_article'],$Pile[$SP]['id_breve'],$Pile[$SP]['id_rubrique'],$Pile[$SP]['id_syndic'])] = 1; // invalideurs

		$t0 .= ('
        <li class="menu-item">' .
(($t1 = affdate_court(vider_date($Pile[$SP]['date_heure']))) ?
			('<i>' . $t1 . '</i>:') :
			('')) .
'
        <a href="' .
safehtml(htmlspecialchars(vider_url(generer_url_forum($Pile[$SP]['id_forum'])))) .
'">' .
interdire_scripts(safehtml(typo($Pile[$SP]['titre']))) .
'</a>
        </li>
');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE auteurs>
//
function BOUCLE_auteurs_unhtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("auteurs.id_auteur",
		"auteurs.nom"), # SELECT
		array("spip_auteurs_articles AS auteurs_articles1","spip_auteurs AS auteurs"), # FROM
		array("auteurs.id_auteur=auteurs_articles1.id_auteur",
		"(auteurs_articles1.id_article = '" . addslashes($Pile[$SP]['id_article']) . "')",
		"NOT(auteurs.statut='5poubelle')"), # WHERE
		'auteurs.id_auteur', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'auteurs', # table
		'_auteurs_un', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_auteur'][$Pile[$SP]['id_auteur']] = 1; // invalideurs

		$t1 = interdire_scripts(typo($Pile[$SP]['nom']));
		$t0 .= (($t1 && $t0) ? ', ' : '') . $t1;
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_article_unhtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.id_rubrique",
		"articles.surtitre",
		"articles.titre",
		"articles.soustitre",
		"articles.date",
		"articles.popularite",
		"articles.texte",
		"articles.chapo",
		"articles.descriptif",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.popularite' . ' DESC'), # ORDER
		'0,2', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_article_un', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	' .
affiche_logos(calcule_logo('ARTICLE', 'ON', $Pile[$SP]['id_article'],$Pile[$SP]['id_rubrique'],  '0'), htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))), 'right') .
'
	' .
(($t1 = interdire_scripts(typo($Pile[$SP]['surtitre']))) ?
			('<div class="surtitre">' . $t1 . '</div>') :
			('')) .
'
	<h2 class="titre-extrait"><a href="' .
htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))) .
'">' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></h2>
	' .
(($t1 = interdire_scripts(typo($Pile[$SP]['soustitre']))) ?
			('<div class="surtitre">' . $t1 . '</div>') :
			('')) .
'
	<div class="detail">
	' .
nom_jour(vider_date($Pile[$SP]['date'])) .
' ' .
affdate(vider_date($Pile[$SP]['date'])) .
'
	' .
(($t1 = BOUCLE_auteurs_unhtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			((_T('public/spip/ecrire:par_auteur') .
' ') . $t1) :
			('')) .
'
	' .
(($t1 = (ceil(min(100, 100 * $Pile[$SP]['popularite']
	/ max(1 , 0 + lire_meta('popularite_max')))))) ?
			(('<br />' .
_T('public/spip/ecrire:popularite') .
'&nbsp;: <span class="important">') . $t1 . '</span> %') :
			('')) .
'
	</div>
	' .
(($t1 = interdire_scripts(calcul_introduction('articles', $Pile[$SP]['texte'], $Pile[$SP]['chapo'], $Pile[$SP]['descriptif']))) ?
			('<div class="texte"><div class="extrait">' . $t1 . '</div></div>') :
			('')) .
'
	<br />
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE syndic_articles>
//
function BOUCLE_syndichtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("syndic_articles.date",
		"syndic_articles.url",
		"syndic_articles.titre",
		"syndic_articles.id_syndic_article"), # SELECT
		array("spip_syndic_articles  AS syndic_articles","spip_syndic AS syndic"), # FROM
		array("syndic_articles.id_syndic=syndic.id_syndic",
		"syndic_articles.statut='publie'",
		"syndic.statut='publie'"), # WHERE
		'', # GROUP
		array('syndic_articles.date' . ' DESC'), # ORDER
		'0,15', # LIMIT
		'', # sous
		'', # HAVING
		'syndic_articles', # table
		'_syndic', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_syndic_article'][$Pile[$SP]['id_syndic_article']] = 1; // invalideurs

		$t0 .= ('
		<li class="menu-item">
		' .
(($t1 = affdate_court(vider_date($Pile[$SP]['date']))) ?
			('<i>' . $t1 . '</i>:') :
			('')) .
'
		<a href="' .
htmlspecialchars(vider_url($Pile[$SP]['url'])) .
'">' .
interdire_scripts($Pile[$SP]['titre']) .
'</a>
		</li>
	');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE auteurs>
//
function BOUCLE_auteurs_recentshtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("auteurs.id_auteur",
		"auteurs.nom"), # SELECT
		array("spip_auteurs_articles AS auteurs_articles2","spip_auteurs AS auteurs"), # FROM
		array("auteurs.id_auteur=auteurs_articles2.id_auteur",
		"(auteurs_articles2.id_article = '" . addslashes($Pile[$SP]['id_article']) . "')",
		"NOT(auteurs.statut='5poubelle')"), # WHERE
		'auteurs.id_auteur', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'auteurs', # table
		'_auteurs_recents', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_auteur'][$Pile[$SP]['id_auteur']] = 1; // invalideurs

		$t1 = interdire_scripts(typo($Pile[$SP]['nom']));
		$t0 .= (($t1 && $t0) ? ', ' : '') . $t1;
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_articles_populaireshtml_69df7021c402c7d0b72417f433333751(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.descriptif",
		"articles.titre",
		"articles.date",
		"articles.popularite",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.popularite' . ' DESC'), # ORDER
		'2,8', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_articles_populaires', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<h2><a href="' .
htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis($Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo($Pile[$SP]['titre'])) .
'</a></h2>
	<div class="detail">
	' .
nom_jour(vider_date($Pile[$SP]['date'])) .
' ' .
affdate(vider_date($Pile[$SP]['date'])) .
'
	' .
(($t1 = BOUCLE_auteurs_recentshtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			((_T('public/spip/ecrire:par_auteur') .
' ') . $t1) :
			('')) .
'<br />
	' .
_T('public/spip/ecrire:popularite') .
'&nbsp;: <span class="important">' .
(ceil(min(100, 100 * $Pile[$SP]['popularite']
	/ max(1 , 0 + lire_meta('popularite_max'))))) .
'</span> %
	</div>
	<br />
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette dist/resume.html
//
function html_69df7021c402c7d0b72417f433333751 ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="' .
lang_dir(($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[0]['lang'] ? $Pile[0]['lang'] : $GLOBALS['spip_lang']) .
'">
<head>
<title>[' .
interdire_scripts(typo(lire_meta('nom_site'))) .
'] </title>
<meta http-equiv="Content-Type" content="text/html; charset=' .
interdire_scripts(lire_meta('charset')) .
'" />

<!-- Ceci est la feuille de style par defaut pour les types internes a SPIP -->
<link rel="stylesheet" href="spip_style.css" type="text/css" />

<!-- Les feuilles de style specifiques aux presents squelettes -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/typographie.css" type="text/css" />

<!-- media="..." permet de ne pas utiliser ce style sous Netscape 4 (sinon plantage) -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/habillage.css" type="text/css" media="print, projection, screen, tv" />
</head>

<body>

<div id="navigation">

<h1 class="structure">' .
_T('public/spip/ecrire:navigation') .
'</h1>

<!-- Menu de navigation general -->

<div class="menu">
<ul class="general">
	<li class="menu-titre">
	' .
(($t1 = interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site'))))) ?
			('<a href="' . $t1 . ('" title="' .
_T('public/spip/ecrire:accueil_site') .
'"><b>' .
interdire_scripts(typo(lire_meta('nom_site'))) .
'</b></a>')) :
			('')) .
'
	</li>
	<li class="menu-item">
	<a href="plan.php">' .
_T('public/spip/ecrire:plan_site') .
'</a>
	</li>
	<li class="menu-item">
	<a href="resume.php">' .
_T('public/spip/ecrire:en_resume') .
'</a>
	</li>
	<li class="menu-item">
	<a href="ecrire/">' .
_T('public/spip/ecrire:espace_prive') .
'</a>
	</li>
</ul>
</div>


<!-- Formulaire de recherche -->

' .
executer_balise_dynamique('FORMULAIRE_RECHERCHE',
	array(),
	array(''), $GLOBALS['spip_lang'],45) .
'

<!-- Liens des forums -->
' .
(($t1 = BOUCLE_forums_lienshtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
<div class="menu" title="' .
_T('public/spip/ecrire:derniers_messages_forum') .
'">
	<h1 class="structure">' .
_T('public/spip/ecrire:messages_recents') .
'</h1>
	<div class="forums">
	<div class="menu-titre">
	' .
_T('public/spip/ecrire:derniers_commentaires') .
'
	</div>
	<ul>
') . $t1 . '
	</ul>
	</div>
</div>
') :
			('')) .
'


</div>

<!-- Une : articles les plus populaires -->

<div id="principal" class="contenu">

<h1 class="structure">' .
_T('public/spip/ecrire:articles_populaires') .
'</h1>

' .
BOUCLE_article_unhtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP) .
'


	<div class="encart">

	<!-- ' .
_T('public/spip/ecrire:sur_web') .
' -->

	<h1 class="structure">' .
_T('public/spip/ecrire:nouveautes_web') .
'</h1>

	' .
(($t1 = BOUCLE_syndichtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<div class="menu">
	<div class="divers">
		<div class="menu-titre">
		' .
_T('public/spip/ecrire:sur_web') .
'
		</div>
		<ul>
	') . $t1 . '
		</ul>
	</div>
	</div>
	') :
			('')) .
'

	</div>


<h1 class="structure">' .
_T('public/spip/ecrire:articles_populaires') .
' (' .
_T('public/spip/ecrire:suite') .
')</h1>

<!-- Articles les plus populaires (suite) -->

' .
BOUCLE_articles_populaireshtml_69df7021c402c7d0b72417f433333751($Cache, $Pile, $doublons, $Numrows, $SP) .
'


</div>

</body>
</html>


');

	return array(
		'texte' => $t0,
		'squelette' => 'html_69df7021c402c7d0b72417f433333751',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>